Kameleon-Plus  0.3.2
Public Types | Public Member Functions | Friends | List of all members
ccmc::Attribute Class Reference

TODO: brief description of Attribute class. More...

#include <ccmc/Attribute.h>

Public Types

enum  AttributeType { FLOAT, INT, STRING }
 

Public Member Functions

std::string getAttributeName ()
 
void setAttributeName (std::string attributeName)
 
void setAttributeValue (std::string &value)
 
void setAttributeValue (int &value)
 
void setAttributeValue (float &value)
 
AttributeType getAttributeType ()
 
float getAttributeFloat ()
 
std::string getAttributeString ()
 
int getAttributeInt ()
 
 Attribute ()
 
std::string toString () const
 
virtual ~Attribute ()
 

Friends

std::ostream & operator<< (std::ostream &out, const Attribute attribute)
 

Detailed Description

TODO: brief description of Attribute class.

TODO: full description of Attribute class

Member Enumeration Documentation

Enumerator
FLOAT 
INT 
STRING 

Constructor & Destructor Documentation

ccmc::Attribute::Attribute ( )

Default constructor. Initializes the attributeName to "", the string value to "", and the integer and float values to 0.

ccmc::Attribute::~Attribute ( )
virtual

Destructor

Member Function Documentation

float ccmc::Attribute::getAttributeFloat ( )

Returns the attribute value as a float, if applicable.

Returns
The float value of the attribute. The value returned will be 0.f if the AttributeType of the Attribute object is not Attribute::FLOAT
int ccmc::Attribute::getAttributeInt ( )

Returns the attribute value as an int, if applicable.

Returns
The int value of the attribute. The value returned will be 0 if the AttributeType of the Attribute object is not Attribute::FLOAT
std::string ccmc::Attribute::getAttributeName ( )

Returns the attribute's name as a std::string object.

Returns
The attribute's name
std::string ccmc::Attribute::getAttributeString ( )

Returns the string representation of the attribute, if applicable.

Returns
The string value of the attribute. This value will be an empty string if the AttributeType of the Attribute object is not Attribute::STRING
Attribute::AttributeType ccmc::Attribute::getAttributeType ( )
Returns
AttributeType of the Attribute object
void ccmc::Attribute::setAttributeName ( std::string  name)

Sets the attribute name

Parameters
nameThe attribute name requested.
void ccmc::Attribute::setAttributeValue ( std::string &  value)

Copies the contents of value and stores them.

Parameters
valuethe new attribute value
void ccmc::Attribute::setAttributeValue ( int &  value)

Copies the contents of value and stores them.

Parameters
valuethe new attribute value
void ccmc::Attribute::setAttributeValue ( float &  value)

Copies the contents of value and stores them.

Parameters
valuethe new attribute value
std::string ccmc::Attribute::toString ( ) const
Returns

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Attribute  attribute 
)
friend

The documentation for this class was generated from the following files: